<template>
  <el-table
    v-loading="listLoading"
    :data="list"
    align="center"
    border
    style="width: 100%"
    @selection-change="handleSelectionChange"
  >
    <el-table-column type="selection" width="55" />
    <el-table-column prop="name" label="姓名" align="center" />
    <el-table-column prop="mobile" label="手机号" align="center" />
    <el-table-column label="身份类别" align="center" width="100">
      <template slot-scope="scope">
        <span>{{ scope.row.ibbElec ? '个体工商户' : '电工' }}</span>
      </template>
    </el-table-column>
    <el-table-column label="认证状态" align="center" width="100">
      <template slot-scope="scope">
        <el-tag v-if="scope.row.ifVerified === 1" size="mini" type="danger">实名</el-tag>
        <el-tag v-if="scope.row.ifCertificate === 1" size="mini" type="danger">证书</el-tag>
        <el-tag v-if="scope.row.ifWorkType === 1" size="mini" type="danger">技能</el-tag>
      </template>
    </el-table-column>
    <el-table-column prop="regTime" label="注册时间" align="center" />
  </el-table>
</template>
<script>
export default {
  props: {
    list: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      listLoading: false
    }
  },
  methods: {
    handleSelectionChange(arr) {
      this.$emit('handleSelectionChange', arr)
    }
  }
}
</script>
